package org.jwos.platform.domain;

import java.util.Hashtable;

public class GlobalSession {
	
	private Hashtable attributes = new Hashtable();
	
	private String sessionId;
	
	private User user;
	
	public GlobalSession() {		
	}
	
	public Object getAttribute(String name) {
		return this.attributes.get(name);
	}
	
	public void setAttribute(String name,Object value) {
		this.attributes.put(name, value);
	}
	
	public void removeAttribute(String name) {
		if(this.attributes.containsKey(name)) {
			this.attributes.remove(name);
		}
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}
